# include <iostream>

using namespace std;
void test01(){
    string str1="abcdefgh";
    int pos =str1.find("de");
    if (pos==-1){
        cout<<"未找到"<<endl;
    } else{
        cout<<"pos="<<pos<<endl;
    }
    pos=str1.rfind("de");
    cout<<"pos="<<pos<<endl;
}
void test02(){
    string str1="abcdefgde";
    str1.replace(1,3,"woaini");
    cout<<"str1="<<str1<<endl;
}
int main() {
test01();
test02();
    system("pause");
    return 0;
}
